import request from '@/utils/request'
export const getDepartments = () => {
  return request({
    url: '/company/department'
  })
}
// 获取负责人列表

export const getEmployeeSimple = () => {
  return request({
    url: '/sys/user/simple'
  })
}
// 新增部门
export const addDepartments = (data) => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
// 数据回填
export const getDepartDetail = (id) => {
  return request({
    url: `/company/department/${id}`
  })
}
// 更新部门
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 删除部门
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
